package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 物料档案对象 main_item
 *
 * @author qijian
 * @date 2021-09-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_item")
public class Item extends BaseEntity{

    @TableId
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long itemId;

    /** 物料编码 */
    @Excel(name = "物料编码")
    @ApiModelProperty(value = "物料编码")
    private String itemCode;

    /** 物料名称 */
    @Excel(name = "物料名称")
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    /** 字母检索 */
    @Excel(name = "字母检索")
    @ApiModelProperty(value = "字母检索")
    private String letterSearch;

    /** 物料分类 */
    @Excel(name = "物料分类")
    @ApiModelProperty(value = "物料分类")
    private String itemClassify;

    /** 物料分类 */
    @ApiModelProperty(value = "物料分类编码")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long itemClassifyId;

    /** 物料规格 */
    @Excel(name = "物料规格")
    @ApiModelProperty(value = "物料规格")
    private String itemSpec;

    /** 物料来源 */
    @Excel(name = "物料来源")
    @ApiModelProperty(value = "物料来源")
    private String itemSource;

    /** 物料单位 */
    @Excel(name = "物料单位")
    @ApiModelProperty(value = "物料单位")
    private String itemUnits;

    /** 物料辅助单位 */
    @Excel(name = "物料辅助单位")
    @ApiModelProperty(value = "物料辅助单位")
    private String itemUnitSup;

    /** 物料类型 */
    @Excel(name = "物料类型")
    @ApiModelProperty(value = "物料类型")
    private String itemType;

    /** 物料属性 */
    @Excel(name = "物料属性")
    @ApiModelProperty(value = "物料属性")
    private String itemAttr;

    /** 物料版本 */
    @Excel(name = "物料版本")
    @ApiModelProperty(value = "物料版本")
    private String itemVersion;

    /** 是否禁用 */
    @Excel(name = "是否禁用")
    @ApiModelProperty(value = "是否禁用")
    private Boolean isDisabled;

    /** 备注 */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Excel(name = "净重")
    @ApiModelProperty(value = "净重")
    private BigDecimal itemWeight;

    @Excel(name = "毛重")
    @ApiModelProperty(value = "毛重")
    private BigDecimal grossWeight;

    /** 类型 */
    @Excel(name = "类型")
    @ApiModelProperty(value = "类型")
    private String typeName;

    /** 分组 */
    @Excel(name = "分组")
    @ApiModelProperty(value = "分组")
    private String groupName;

    /** 属性类别 */
    @Excel(name = "属性类别")
    @ApiModelProperty(value = "属性类别")
    private String oraCombo;

    /** 件号 */
    @Excel(name = "件号")
    @ApiModelProperty(value = "件号")
    private String partNo;

    /** 图号 */
    @Excel(name = "图号")
    @ApiModelProperty(value = "图号")
    private String drawingNo;

    /** 物料价格 */
    @Excel(name = "物料价格")
    @ApiModelProperty(value = "物料价格")
    private BigDecimal itemPrice;

    /** 物料定价日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "物料定价日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "物料定价日期")
    private Date itemPriceDate;

    /** 交货天数 */
    @Excel(name = "交货天数")
    @ApiModelProperty(value = "交货天数")
    private Long deliveryDays;

    /** 最小包装 */
    @Excel(name = "最小包装")
    @ApiModelProperty(value = "最小包装")
    private BigDecimal minPackage;

    /** 安全库存 */
    @Excel(name = "安全库存")
    @ApiModelProperty(value = "安全库存")
    private BigDecimal safeStock;

    /** 负责人ID */
    @Excel(name = "负责人ID")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "负责人ID")
    private Long chargeId;

    /** 负责人名称 */
    @Excel(name = "负责人名称")
    @ApiModelProperty(value = "负责人名称")
    private String chargeName;

    /** 车间ID */
    @Excel(name = "车间ID")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "车间ID")
    private Long workshopId;

    /** 车间名称 */
    @Excel(name = "车间名称")
    @ApiModelProperty(value = "车间名称")
    private String workshopName;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "仓库ID")
    private Long storeId;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    @ApiModelProperty(value = "仓库名称")
    private String storeName;

    /** 库位ID */
    @Excel(name = "库位ID")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "库位ID")
    private Long locationId;

    /** 库位名称 */
    @Excel(name = "库位名称")
    @ApiModelProperty(value = "库位名称")
    private String locationName;

    /** 默认币别 */
    @Excel(name = "默认币别")
    @ApiModelProperty(value = "默认币别")
    private String defaultCurrency;

    /** 质保期限 */
    @Excel(name = "质保期限")
    @ApiModelProperty(value = "质保期限")
    private Integer qaQuantity;

    /** 质保期限类型 */
    @Excel(name = "质保期限类型")
    @ApiModelProperty(value = "质保期限类型")
    private String qaType;

    /** 是否检验 */
    @Excel(name = "是否检验")
    @ApiModelProperty(value = "是否检验")
    private Boolean isCheck;
    /** 是否检验 */
    @Excel(name = "是否允许销售")
    @ApiModelProperty(value = "是否允许销售")
    private Boolean isSale;
    /** 是否检验 */
    @Excel(name = "是否允许采购")
    @ApiModelProperty(value = "是否允许采购")
    private Boolean isPurchase;
    /** 是否检验 */
    @Excel(name = "是否允许库存")
    @ApiModelProperty(value = "是否允许库存")
    private Boolean isStock;
    /** 是否检验 */
    @Excel(name = "起订量")
    @ApiModelProperty(value = "起订量")
    private BigDecimal moq;

    /** 审核者 */
    @Excel(name = "审核者")
    @ApiModelProperty(value = "审核者")
    private String approvalBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    private Date approvalTime;

    /** 审核状态 */
    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private ApprovalDescriptionEnum approvalStatus;

    @ApiModelProperty(value = "组织id")
    private Long orgId;

    @ApiModelProperty(value = "组织名称")
    private String orgName;

    @ApiModelProperty(value = "检验方案ID")
    private Long schemeId;

    @ApiModelProperty(value = "检验方案名称")
    private String schemeName;


    @ApiModelProperty(value = "物料必填项")
    private String itemAttrNeed;


    @ApiModelProperty(value = "批号项")
    private Boolean fIsBatchManage;

    private Long kingdeeItemId;
}
